<?php
namespace Ionafan2\GetonlyimgBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="Ionafan2\GetonlyimgBundle\Repository\ImageRepository")
 * @ORM\Table(name="images")
 */
class Image {

    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(name="link", type="string")
     */
    protected $link;

    /**
     *
     *  @ORM\ManyToOne(targetEntity="Url", inversedBy="images")
     *  @ORM\JoinColumn(name="url_id", referencedColumnName="id")
     */
    protected $url;

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param mixed $link
     */
    public function setLink($link)
    {
        $this->link = $link;
    }

    /**
     * @return mixed
     */
    public function getLink()
    {
        return $this->link;
    }

    /**
     * @param $url Url
     */
    public function setUrl($url)
    {
        $this->url = $url;
    }

    /**
     * @return Url
     */
    public function getUrl()
    {
        return $this->url;
    }

}
